package com.cert.scjp.arrays;

//What is the result in these cases?
public class JavaRanch01 {
	// Question 1)
	public static void main(String[] args) {
		int[][] a = {{1,2,}, {3,4}};
		int[] b = (int[]) a[1];
		Object o1 = a;
		int[][] a2 = (int[][]) o1;
		int[] b2 = (int[]) o1; // runtime error occurs here
		System.out.println(b[1]);
	}

	// Question 2)
	static class Zippy {
		String[] x;
		int[]a[] = {{1,2}, {1}};
		int[] []b[] = {{{1,2},{1,2}}, {{1,2}}};
		Object c = new long[4];
		Object[] d = x;
	}
}
